<?php
/* @var $this EmpPersonaController */
/* @var $model EmpPersona */
/* @var $form CActiveForm */
?>

<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'emp-persona-form',
        'enableAjaxValidation' => false,
            ));
    ?>

    <?php
    $sexos = GlosaPerSexo::model()->findAll();
    $listSexo = CHtml::listData($sexos, 'id', 'nombre');
    ?>
    <p class="note">Campos con <span class="required">*</span> son requeridos.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'emp_empresa_id'); ?>
        <?php echo $form->textField($model, 'emp_empresa_id'); ?>
        <?php echo $form->error($model, 'emp_empresa_id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'nombres'); ?>
        <?php echo $form->textField($model, 'nombres', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'nombres'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'apellidos'); ?>
        <?php echo $form->textField($model, 'apellidos', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'apellidos'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'fe_nac'); ?>
        <?php echo $form->dateField($model, 'fe_nac'); ?>
        <?php echo $form->error($model, 'fe_nac'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'sexo'); ?>
        <?php echo $form->dropDownList($model, 'sexo', $listSexo); ?>
        <?php //echo $form->textField($model, 'sexo', array('size' => 1, 'maxlength' => 1)); ?>
        <?php echo $form->error($model, 'sexo'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'doc_identidad'); ?>
        <?php echo $form->textField($model, 'doc_identidad', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'doc_identidad'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'telefono'); ?>
        <?php echo $form->textField($model, 'telefono', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'telefono'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'celular'); ?>
        <?php echo $form->textField($model, 'celular', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'celular'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'correo'); ?>
        <?php echo $form->textField($model, 'correo', array('size' => 45, 'maxlength' => 45)); ?>
        <?php echo $form->error($model, 'correo'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Grabar'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->